fix(ComplexSelector): keep the popup gap when opening above - #4820
Open
AKnassa wants to merge 1 commit into
Open
fix(ComplexSelector): keep the popup gap when opening above#4820AKnassa wants to merge 1 commit into
AKnassa wants to merge 1 commit into
Conversation
The popup layer only set marginBlockStart, which spaces a popup opening downward but leaves placement="above" flush against the trigger (computed margin-block-end was 0px via useLayer's margin reset). Both block edges now carry the gap, mirroring Popover's gap style, so the clearance holds whichever way the layer opens. Fixes facebook#4803
|
@AKnassa is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
August 8, 2026 03:47
AKnassa
marked this pull request as ready for review
August 8, 2026 03:48
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsComplexSelector (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
When a ComplexSelector menu opens upward, it now keeps the same small gap above the field that it already keeps when opening downward.
Why
With
placement="above"the popup sat flush against the field, so the popup and the field read as one merged block (#4803). The same component already spaced correctly when opening downward, and Popover spaced correctly in both directions.What changed
@astryxdesign/corepatch release.How to see it
Render a
ComplexSelectorwithplacement="above"near the bottom of the page and open it. Measured in a browser before and after: the space between the popup and the field goes from 0px to 4px, identical toPopoverat the same placement.placement="below"is unchanged at 4px.Fixes #4803